package oo.day04;

import java.util.Date;

public class AnimalTest {
    public static void main(String[] args) {
//        向上转型
        Animal animal = new Cat();
        animal.eat();
        animal.move();

        Animal animal1 = new Dog();
        animal1.eat();
        animal1.move();
//        向下转型
        Dog dog1 = (Dog) animal1;
        dog1.eat();
        dog1.move();

        long begin = System.currentTimeMillis();

    }
}
